/*
 * Pid.h
 *
 *  Created on: 2025骞�9鏈�16鏃�
 *      Author: Move
 */

#ifndef CODE_PID_H_
#define CODE_PID_H_

#include "zf_common_headfile.h"

typedef struct{
    float Target;
    float Actual;
    float Out;

    float Kp;
    float Ki;
    float kp1;
    float Kd;

    float Error0;
    float Error1;
    float Error2;
    float ErrorInt;

    float OutMax;
    float OutMin;
    float MAXInt;

} PID_T;

void InsPId_Updata(PID_T *p);    // 增量式PID
void PosPId_Updata(PID_T *p);    // 位置式PID

#endif /* CODE_PID_H_ */
